﻿Feature: Interception
	As a component in a system that consumes the Patterns library,
	I want to be able to retrieve instances of objects that have
	been intercepted and modified in various ways.

Scenario: Performance Metrics
	Given I have created a complex test object
	And I have created a simple performance metric interceptor
	When I create a proxy using the test object and the interceptor
	And I call all non-exceptional methods on the proxy
	Then the metric collection should have received metrics for each method call

Scenario: Performance Metrics (Filtered)
	Given I have created a complex test object
	And I have created a simple performance metric interceptor that only recognizes one method
	When I create a proxy using the test object and the interceptor
	And I call all non-exceptional methods on the proxy
	Then the metric collection should have received metrics for one method call

Scenario: Log
	Given I have created a complex test object
	And I have created a simple logging interceptor
	When I create a proxy using the test object and the interceptor
	And I call all non-exceptional methods on the proxy
	Then the log should have received entries for each method call

Scenario: Log (Filtered)
	Given I have created a complex test object
	And I have created a simple logging interceptor that only recognizes one method
	When I create a proxy using the test object and the interceptor
	And I call all non-exceptional methods on the proxy
	Then the log should have received entries for one method call

Scenario: Log with Errors
	Given I have created a complex test object
	And I have created a simple error logging interceptor
	When I create a proxy using the test object and the interceptor
	And I call all exceptional methods on the proxy
	Then the log should have received error entries for each method call

Scenario: Log with Errors (Filtered)
	Given I have created a complex test object
	And I have created a simple error logging interceptor that only recognizes one method
	When I create a proxy using the test object and the interceptor
	And I call all exceptional methods on the proxy
	Then the log should have received error entries for one method call